<template>
  <!-- <keep-alive>
    <router-view v-if="route.meta.keepAlive" />
  </keep-alive> -->
  <router-view v-slot="{ Component }">
    <keep-alive>
      <component :is="Component" :key="route.name" v-if="route.meta.keepAlive" />
    </keep-alive>
    <component :is="Component" :key="route.name" v-if="!route.meta.keepAlive" />
  </router-view>
  <Tabbar
    v-if="
      ![
        'login',
        'register',
        'add_address',
        'addresslist',
        'detail',
        'search',
        'order',
        'myorder',
        'test',
      ].includes(route.name)
    "
  />
</template>
<script setup>
import { useRoute } from "vue-router";
const route = useRoute();
console.log(route);
</script>
<style lang="scss">
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
}

body {
  // background-color: #f9f9f9;
  height: 100%;
  width: 100%;
}

nav {
  padding: 30px;

  a {
    font-weight: bold;
    color: #2c3e50;

    &.router-link-exact-active {
      color: #42b983;
    }
  }
}
</style>
